<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>获取otp信息</title>
    <link rel="stylesheet" href="../static/assets/global/plugins/bootstrap/css/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="../static/assets/global/css/components.css" type="text/css" />
    <link rel="stylesheet" href="../static/admin/pages/css/login.css" type="text/css" />
    <script src="../static/assets/global/plugins/jquery-1.11.0.min.js" type="text/javascript"></script>
</head>
<body class="login">
    <div class="content">
        <h3 class="form-title">用户注册</h3>
        <div class="form-group">
            <label class="control-label">手机号</label>
            <div>
                <input type="text" class="form-control" placeholder="手机号" id="telephone" name="telephone"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label">验证码</label>
            <div>
                <input type="text" class="form-control" placeholder="验证码" id="otpCode" name="otpCode"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label">用户昵称</label>
            <div>
                <input type="text" class="form-control" placeholder="用户昵称" id="name" name="name"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label">性别</label>
            <div>
                <input type="text" class="form-control" placeholder="性别" id="gender" name="gender"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label">年龄</label>
            <div>
                <input type="text" class="form-control" placeholder="年龄" id="age" name="age"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label">密码</label>
            <div>
                <input type="password" class="form-control" placeholder="密码" id="password" name="password"/>
            </div>
        </div>
        <div class="form-actions">
            <button class="btn blue" id="register" type="submit">
                提交注册
            </button>
			<button class="btn blue" id="test" type="submit">
                测试
            </button>
        </div>
    </div>
</body>
<script>
    jQuery(document).ready(function () {
        //绑定otp的click时间用于向后端发送获取手机验证码的请求
        $("#test").on("click",function(){
            var info = '{"roominfo":{"roomname":"会议室01","address":"9 楼 ","peoplenumber":"10 人 ","equipment":"投影仪","company":"信息化","companyid":"00001","adminname":"王旭","adminid":"wangxu1","isopen":"1"},"meetinfo":{"meetingtheme":"测试 ","content":"会议内容","username":"王旭","userid":"wangxu1","time":"20191121","starttime":"10:00:00","endtime":"12:00:00","zt":"1"}}';
            $.ajax({
                type:"POST",
				dataType: "json",
                contentType:"application/x-www-form-urlencoded",
                url:"http://localhost:8888/eip/meeting/api/meetingBooking",
                data:{
                    "info":info
                },
                xhrFields:{withCredentials:true},
                success:function(data){
                    if(data.status=="success"){
                        alert("预约成功");
                    }else{
						alert("预约失败");
					}
                },
                error:function(data){
                    alert("预约失败");
                }
            });
            return false;
        })
    })
</script>
</html>